#!/usr/bin/env bash

DMALL_DOCKER_REGISTRY=ec2-54-95-48-23.ap-northeast-1.compute.amazonaws.com:5000
BUILD_NUMBER=2
SLUG=thoughtworks-school

docker build -t $DMALL_DOCKER_REGISTRY/$SLUG/jenkins:$BUILD_NUMBER .
docker tag $DMALL_DOCKER_REGISTRY/$SLUG/jenkins:$BUILD_NUMBER $DMALL_DOCKER_REGISTRY/$SLUG/jenkins:latest

docker push $DMALL_DOCKER_REGISTRY/$SLUG/jenkins:$BUILD_NUMBER
docker push $DMALL_DOCKER_REGISTRY/$SLUG/jenkins:latest